import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { AlarmOverviewVo} from '@/api/facility/equipment-overview/types';

/**
 * 查询设备信息列表
 * @param query
 * @returns {*}
 */

export const alarmOverviewStatistics = (): AxiosPromise<AlarmOverviewVo[]> => {
  return request({
    url: '/equipment/assetFacilitiesOverview/alarmOverviewStatistics',
    method: 'get'
  });
};

/**
 * 近7日告警策略TOP5
 * @param query
 * @returns {*}
 */

export const alarmStrategyPast7DaysTop5 = (): AxiosPromise<AlarmOverviewVo[]> => {
  return request({
    url: '/equipment/assetFacilitiesOverview/alarmStrategyPast7DaysTop5',
    method: 'get'
  });
};

/**
 * 近7日新增告警趋势
 * @param query
 * @returns {*}
 */

export const alarmAddPast7Days = (): AxiosPromise<AlarmOverviewVo[]> => {
  return request({
    url: '/equipment/assetFacilitiesOverview/alarmAddPast7Days',
    method: 'get'
  });
};

